/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rd.project.model;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author Jelle
 */
@Entity
@Table(name="StudentVak")
public class StudentVak implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private Long studentId;
    private Long vakId;
    private Long jaarId;
    private Student student;
    private Vak vak;

    public StudentVak(Long id, Student student, Vak vak, Jaar jaar) {
        this.id = id;
        this.student = student;
        this.vak = vak;
        this.jaar = jaar;
    }

    public Jaar getJaar() {
        return jaar;
    }

    public void setJaar(Jaar jaar) {
        this.jaar = jaar;
    }
    private Jaar jaar;
    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }

    public Vak getVak() {
        return vak;
    }

    public void setVak(Vak vak) {
        this.vak = vak;
    }
    

    public StudentVak(){}
    public StudentVak(Long id, Long studentId, Long vakId, Long jaarId) {
        this.id = id;
        this.studentId = studentId;
        this.vakId = vakId;
        this.jaarId = jaarId;
    }

    public Long getStudentId() {
        return studentId;
    }

    public void setStudentId(Long studentId) {
        this.studentId = studentId;
    }

    public Long getVakId() {
        return vakId;
    }

    public void setVakId(Long vakId) {
        this.vakId = vakId;
    }

    public Long getJaarId() {
        return jaarId;
    }

    public void setJaarId(Long jaarId) {
        this.jaarId = jaarId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof StudentVak)) {
            return false;
        }
        StudentVak other = (StudentVak) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.rd.project.model.StudentVak[ id=" + id + " ]";
    }
    
}
